package cn.hy;


import cn.hy.service.MessageService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.annotation.Resource;

@EnableAspectJAutoProxy
@EnableTransactionManagement
@SpringBootApplication
public class App implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(App.class,args);
    }


    @Resource
    private MessageService messageService;


    @Override
    public void run(String... args) throws Exception {
         messageService.customTxManagerMessage();

        // messageService.setMessage("hello");
    }
}